Skip to content

crypto: harden correctness and backend assurance - #73

Merged
loadingalias merged 17 commits into
mainfrom
maintenance/remediate-20260728
Aug 2, 2026
Merged

crypto: harden correctness and backend assurance#73
loadingalias merged 17 commits into
mainfrom
maintenance/remediate-20260728

Conversation

@loadingalias

@loadingalias loadingalias commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • repair correctness defects across AEAD, hashes, KDFs, RSA, dispatch, and cache behavior
  • correct x86 CRC-16 and CRC-24 PCLMUL four-way tail processing against the portable authority
  • strengthen secret cleanup and compiler-backed constant-time/zeroization evidence
  • harden RSA reusable scratch, CRT exponent handling, and private-factor imports
  • add reproducible assembly and test-vector provenance with exact CI enforcement
  • reconcile documentation, benchmarks, and reviewed release-change intent

RSA private imports

Private-key imports now require conventional half-modulus-width factors and apply trial division plus a deterministic 32-base Miller–Rabin probable-prime screen through one shared raw-components, PKCS #1, PKCS #8, diagnostic, and fuzz-import path. The screen is deliberately documented as screening rather than a mathematical primality proof and does not add an entropy, dependency, or public policy mechanism.

Validation

  • just check-all passed on macOS during the frozen campaign validation
  • just test --all passed: 1,691 tests with one intentional skip, plus 218 doctests
  • focused RSA default module: 49/49
  • focused RSA alloc,rsa,portable-only: 48/48
  • NIST RSA subset: 5/5
  • RSA public/import integration: 56/56
  • Wycheproof RSA: 6/6
  • direct campaign-versus-baseline semver: 196/196
  • focused x86_64 CRC-24 PCLMUL differential test passed under Rosetta, including the CI-reported 1023-byte tail shape
  • cargo rail change check --merge-base --required passed
  • final normal just push light gate passed cargo-rail unification, release intent, workflow action pins, and host Rust checks

Target-native RISC-V, IBM Z, POWER, x86-64 RSA assembly, and Sapphire Rapids AMX execution is intentionally assigned to the repository's real CI runners rather than emulated locally.

Release intent

The resulting release intent is major because reviewed changes intentionally tighten public API and accepted-input contracts. Under the pre-1.0 versioning policy, this prepares version 0.8.0.

Repair cross-cutting defects found by the repository-wide maintenance campaign.

- correct AEAD, hash, KDF, RSA, dispatch, and cache behavior
- strengthen secret cleanup and constant-time/zeroization evidence
- validate RSA private factors and reusable scratch invariants
- pin assembly and vector provenance with exact CI enforcement
- reconcile documentation, benchmarks, and release-change intent
Give the POWER-specific detection tests a unique module name so the native powerpc64 test build does not collide with the shared detection test module.
Fix the CRC-16 PCLMUL four-way tail boundary, account for x86-64 runtime capability safety gates, and preserve MSRV-compatible CPUID calls without nightly lint failures.
Start the residual PCLMUL tail after all complete four-block groups so inputs with a partial final group are processed exactly once.
Pin cargo-rail 0.20.0 and cargo-rail-action v6.1.0 to their authenticated releases. Validate separate scope and surface outputs through the fail-closed resolver and advance the required nightly.
Exclude the AMX permission test when portable-only suppresses runtime capabilities. Split RSAES-PKCS1-v1_5 Wycheproof coverage into bounded nextest units without dropping vectors or changing timeout policy.
The pinned nightly warns on chunks_exact_to_as_chunks across audited cryptographic loops. Keep their established iterator and remainder semantics instead of mechanically rewriting 74 unrelated sites.
Make feature selection, migration sizing, and portable dispatch behavior actionable for integrators. Narrow benchmark, constant-time, compliance, security, and release wording to the evidence the repository can prove.
Resolve Ubuntu CT dependencies from authenticated repository candidates
and bind formal evidence to the exact BINSEC executable.

Refresh audited compiler API snapshots and classify the new KMAC and
bounded PBKDF2 verification surfaces.
Verify OPAM metadata from an exact clean checkout, parse native POWER and s390x tool output, and keep Apple RSA assembly proof on a physical local Mac. Preserve fail-closed workflow ownership, symbol, and zeroization gates.
Use an independent cSHAKE oracle and enforce the KMAC API contract in both fuzz workspaces. Preserve the original fuzz status after archiving all corpora and crash artifacts.
Keep fixed-owner equality scalar at the declassification boundary so required x86 BINSEC kernels remain provable. Resolve retained GOT-indirect calls and classify only exact public-operand and root closures on AArch64.
Place the new resource errors after the existing entropy variant so its numeric cast remains unchanged.
Record the reviewed API compatibility impact honestly. The pre-1.0 release policy still maps this intent to version 0.8.0.
@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@loadingalias
loadingalias merged commit 75ed0ab into main Aug 2, 2026
52 of 56 checks passed
@loadingalias
loadingalias deleted the maintenance/remediate-20260728 branch August 2, 2026 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant